'''
    This program lists out the matching that was used for assigning majors and 
    degrees to workers.
'''

import sys
import pandas as pd
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt 
import csv
import statsmodels.api as sm
from datetime import datetime
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
import string
import scipy
from tabulate import tabulate 

fileSeed = "C:/Users/jsock/Dropbox/Research/GD/International"
listPath = fileSeed + "/Lists/"

##############################################################################
# Create list of keywords within each major
##############################################################################

#-----------------------------
# Arts and Humanities
#-----------------------------

currMajor = "Arts and Humanities"
saveMajor = "Arts_and_Humanities"

keyWords = []

keyWords = keyWords + ['Art']
keyWords = keyWords + ['English']
keyWords = keyWords + ['History']
keyWords = keyWords + ['Journalism']
keyWords = keyWords + ['Language']
keyWords = keyWords + ['Literature']
keyWords = keyWords + ['Music']
keyWords = keyWords + ['Philosophy']
keyWords = keyWords + ['Speech']
keyWords = keyWords + ['Photo']
keyWords = keyWords + ['Acting']
keyWords = keyWords + ['Theater']
keyWords = keyWords + ['Theatre']
keyWords = keyWords + ['Cinema']
keyWords = keyWords + ['Film']
keyWords = keyWords + ['Drama']
keyWords = keyWords + ['Religious']
keyWords = keyWords + ['Religion']
keyWords = keyWords + ['Theology']
keyWords = keyWords + ['Humanities']
keyWords = keyWords + ['Writing']
# New additions
keyWords = keyWords + ['Spanish']
keyWords = keyWords + ['French']
keyWords = keyWords + ['Italian']
keyWords = keyWords + ['German']
keyWords = keyWords + ['Japan']
keyWords = keyWords + ['Chinese']
keyWords = keyWords + ['Russian']
keyWords = keyWords + ['Linguistics']
keyWords = keyWords + ['Liberal Studies']
keyWords = keyWords + ['Painting']
keyWords = keyWords + ['Sculpture']
keyWords = keyWords + ['Dance']
keyWords = keyWords + ['Illustration']
keyWords = keyWords + ['Architect']
keyWords = keyWords + ['Design']
keyWords = keyWords + ['Animation']
keyWords = keyWords + ['Archaeology']
keyWords = keyWords + ['Biblical']
keyWords = keyWords + ['Vocal Performance']
keyWords = keyWords + ['Classics']
keyWords = keyWords + ['Cultural']
keyWords = keyWords + ['Fashion']
keyWords = keyWords + ['Clothing']
keyWords = keyWords + ['Playwrit']
keyWords = keyWords + ['Screenwrit']
keyWords = keyWords + ['Bfa']
keyWords = keyWords + ['Mfa']
# New additions
keyWords = keyWords + ['Rhetoric And Composition']
keyWords = keyWords + ['Jornalismo']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Biological Sciences
#-----------------------------

currMajor = "Biological Sciences"
saveMajor = "Biological_Sciences"

keyWords = []

keyWords = keyWords + ['Biology']
keyWords = keyWords + ['Biochem']
keyWords = keyWords + ['Biophysics']
keyWords = keyWords + ['Botany']
keyWords = keyWords + ['Environmental Science']
keyWords = keyWords + ['Marine Science']
keyWords = keyWords + ['Life Science']
keyWords = keyWords + ['Microbiology']
keyWords = keyWords + ['Bacteriology']
keyWords = keyWords + ['Zoology']
keyWords = keyWords + ['Biological']
keyWords = keyWords + ['Environment']
# New additions
keyWords = keyWords + ['Neuroscience']
keyWords = keyWords + ['Sustainability']
keyWords = keyWords + ['Forestry']
keyWords = keyWords + ['Horticult']
keyWords = keyWords + ['Ecology']
keyWords = keyWords + ['Agricult']
keyWords = keyWords + ['Biotech']
keyWords = keyWords + ['Psychobiology']
keyWords = keyWords + ['Food Science']
keyWords = keyWords + ['Animal Science']
keyWords = keyWords + ['Bioinform']
keyWords = keyWords + ['Genetics']
keyWords = keyWords + ['Physiology']
keyWords = keyWords + ['Biomed']
keyWords = keyWords + ['Biostatistics']
keyWords = keyWords + ['Natural Science']
keyWords = keyWords + ['Natural Resources']
keyWords = keyWords + ['Neurobiology']
keyWords = keyWords + ['Agronomy']
keyWords = keyWords + ['Animal']
keyWords = keyWords + ['Atmospheric']
keyWords = keyWords + ['Bioscience']
keyWords = keyWords + ['Plant']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Business
#-----------------------------

currMajor = "Business"
saveMajor = "Business"

keyWords = []

keyWords = keyWords + ['Accountancy']
keyWords = keyWords + ['Accounting']
keyWords = keyWords + ['Advertising']
keyWords = keyWords + ['Business']
keyWords = keyWords + ['Buisness']
keyWords = keyWords + ['Commerce']
keyWords = keyWords + ['Financ']
keyWords = keyWords + ['Marketing']
keyWords = keyWords + ['Management']
keyWords = keyWords + ['Merchandising']
# New additions
keyWords = keyWords + ['Human Resource']
keyWords = keyWords + ['Actuarial']
keyWords = keyWords + ['Entrepreneur']
keyWords = keyWords + ['Real Estate']
keyWords = keyWords + ['Operations']
keyWords = keyWords + ['Supply']
keyWords = keyWords + ['Industrial']
keyWords = keyWords + ['Banking']
keyWords = keyWords + ['Tax']
keyWords = keyWords + ['Strategy']
keyWords = keyWords + ['Organizational Leadership']
keyWords = keyWords + ['Hospitality']
keyWords = keyWords + ['Insurance']
keyWords = keyWords + ['Tourism']
keyWords = keyWords + ['Organization']
keyWords = keyWords + ['Human Relations']
keyWords = keyWords + ['Leadership']
keyWords = keyWords + ['Organisation']
keyWords = keyWords + ['Entreprenuer']
keyWords = keyWords + ['Corporate']
keyWords = keyWords + ['Hotel']
keyWords = keyWords + ['Labor Relations']
keyWords = keyWords + ['Employment Relations']
keyWords = keyWords + ['Logistics']
keyWords = keyWords + ['Manaerial']
keyWords = keyWords + ['Strategic']
keyWords = keyWords + ['Hr']
keyWords = keyWords + ['Bookkeeping']
keyWords = keyWords + ['Customer Service']
keyWords = keyWords + ['Bcom']
keyWords = keyWords + ['BCom']
keyWords = keyWords + ['Mba']
keyWords = keyWords + ['Bba']
keyWords = keyWords + ['Mis']
# 2022 additions
keyWords = keyWords + ['Gestão']
keyWords = keyWords + ['Administração De Empresas']
keyWords = keyWords + ['Administração']
keyWords = keyWords + ['Sales And Distribution']
keyWords = keyWords + ['Ciências Contábeis']
keyWords = keyWords + ['Publicidade E Propaganda']
keyWords = keyWords + ['Administración De Empresas']
keyWords = keyWords + ['Logística']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Communication
#-----------------------------

currMajor = "Communication"
saveMajor = "Communication"

keyWords = []

keyWords = keyWords + ['Broadcast']
keyWords = keyWords + ['Communication']
keyWords = keyWords + ['Public Relations']
keyWords = keyWords + ['Media']
# New additions
keyWords = keyWords + ['Multimedia']
keyWords = keyWords + ['Television']
keyWords = keyWords + ['Telecomm']
keyWords = keyWords + ['Audio Production']
keyWords = keyWords + ['Journalism']
keyWords = keyWords + ['Speech']
keyWords = keyWords + ['Media']
keyWords = keyWords + ['Event Planning']
keyWords = keyWords + ['Publishing']
keyWords = keyWords + ['Video Production']
keyWords = keyWords + ['Translation']
keyWords = keyWords + ['Visual Effects']
keyWords = keyWords + ['Esl']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Engineering
#-----------------------------

currMajor = "Engineering"
saveMajor = "Engineering"

keyWords = []

keyWords = keyWords + ['Engineer']
keyWords = keyWords + ['Electronic']
keyWords = keyWords + ['Bioengineering']
keyWords = keyWords + ['Mechanical']
keyWords = keyWords + ['Electrical']
keyWords = keyWords + ['Welding']
keyWords = keyWords + ['Aeronautic']
keyWords = keyWords + ['Mech Eng']
keyWords = keyWords + ['Mechatronics']
keyWords = keyWords + ['Materials']
keyWords = keyWords + ['Ece']
keyWords = keyWords + ['Ee']
keyWords = keyWords + ['Eee']
# 2022 additions
keyWords = keyWords + ['Engenharia']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Education
#-----------------------------

currMajor = "Education"
saveMajor = "Education"

keyWords = []

keyWords = keyWords + ['Education']
keyWords = keyWords + ['Teach']
keyWords = keyWords + ['Curriculum']
keyWords = keyWords + ['Elementary']
keyWords = keyWords + ['Early Childhood']
keyWords = keyWords + ['Child Development']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Physical Sciences
#-----------------------------

currMajor = "Physical Sciences"
saveMajor = "Physical_Sciences"

keyWords = []

keyWords = keyWords + ['Astronomy']
keyWords = keyWords + ['Meteorology']
keyWords = keyWords + ['Chemistry']
keyWords = keyWords + ['Earth Science']
keyWords = keyWords + ['Geology']
keyWords = keyWords + ['Math']
keyWords = keyWords + ['Physics']
keyWords = keyWords + ['Statistics']
keyWords = keyWords + ['Physical Science']
# New additions
keyWords = keyWords + ['Computational']
keyWords = keyWords + ['Astrophysics']
keyWords = keyWords + ['Analytics']
keyWords = keyWords + ['Quantitative']
keyWords = keyWords + ['Geoscience']
keyWords = keyWords + ['Geophysics']
keyWords = keyWords + ['Geological']
keyWords = keyWords + ['Geochemistry']
keyWords = keyWords + ['General Science']
keyWords = keyWords + ['Science']
# 2022 additions
keyWords = keyWords + ['Química']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Health Service Professions
#-----------------------------

currMajor = "Health Service"
saveMajor = "Health_Service"

keyWords = []

keyWords = keyWords + ['Health Technology']
keyWords = keyWords + ['Medic']
keyWords = keyWords + ['Dent']
keyWords = keyWords + ['Laboratory']
keyWords = keyWords + ['Veterinar']
keyWords = keyWords + ['Nursing']
keyWords = keyWords + ['Nurse']
keyWords = keyWords + ['Pharmac']
keyWords = keyWords + ['Therapy']
keyWords = keyWords + ['Public Health']
keyWords = keyWords + ['Health Sciences']
keyWords = keyWords + ['Phlebot']
keyWords = keyWords + ['Immun']
keyWords = keyWords + ['Allied Health']
keyWords = keyWords + ['Physician Assistant']
keyWords = keyWords + ['Exercise Science']
keyWords = keyWords + ['Healthcare']
keyWords = keyWords + ['Health Care']
keyWords = keyWords + ['Health Service']
keyWords = keyWords + ['Mental Health']
keyWords = keyWords + ['Nutrition']
keyWords = keyWords + ['Dietetics']
keyWords = keyWords + ['Epidemiology']
keyWords = keyWords + ['Radiology']
keyWords = keyWords + ['Pre-Med']
keyWords = keyWords + ['Pre-Health']
keyWords = keyWords + ['Pre-Vet']
keyWords = keyWords + ['Premed']
keyWords = keyWords + ['Physical Therapist']
keyWords = keyWords + ['Athletic Training']
keyWords = keyWords + ['Behavior Analysis']
keyWords = keyWords + ['Sports and Fitness']
keyWords = keyWords + ['Health and Wellness']
keyWords = keyWords + ['Human Development']
keyWords = keyWords + ['Health Studies']
keyWords = keyWords + ['Clinical']
keyWords = keyWords + ['Exercise']
keyWords = keyWords + ['Health']
keyWords = keyWords + ['Hospital Administration']
keyWords = keyWords + ['Kinesiology']
keyWords = keyWords + ['Occupational']
keyWords = keyWords + ['Paramedic']
keyWords = keyWords + ['Personal Train']
keyWords = keyWords + ['Physician']
keyWords = keyWords + ['Physio']
keyWords = keyWords + ['Radiography']
keyWords = keyWords + ['Radiologic']
keyWords = keyWords + ['Rehabilitation']
keyWords = keyWords + ['Respiratory Care']
keyWords = keyWords + ['Optometry']
keyWords = keyWords + ['Pediatrics']
keyWords = keyWords + ['Audiology']
keyWords = keyWords + ['Bpharm']
keyWords = keyWords + ['Bsn']
keyWords = keyWords + ['Rn']
keyWords = keyWords + ['Cna']
keyWords = keyWords + ['Emt']
keyWords = keyWords + ['Lpn']
# 2022 additions
keyWords = keyWords + ['Enfermagem']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Social Service Professions
#-----------------------------

currMajor = "Social Service"
saveMajor = "Social_Service"

keyWords = []

keyWords = keyWords + ['Criminal Justice']
keyWords = keyWords + ['Criminology']
keyWords = keyWords + ['Forensics']
keyWords = keyWords + ['Justice']
keyWords = keyWords + ['Urban Planning']
keyWords = keyWords + ['Law']
keyWords = keyWords + ['Military Science']
keyWords = keyWords + ['Legal']
keyWords = keyWords + ['Library']
keyWords = keyWords + ['Archival Science']
keyWords = keyWords + ['Paralegal']
keyWords = keyWords + ['Regional Planning']
keyWords = keyWords + ['Social Work']
keyWords = keyWords + ['Public Policy']
keyWords = keyWords + ['Public Safety']
keyWords = keyWords + ['Public Administration']
keyWords = keyWords + ['Human Services']
keyWords = keyWords + ['Police']
keyWords = keyWords + ['Forensic']
keyWords = keyWords + ['Counseling']
keyWords = keyWords + ['Fire Science']
keyWords = keyWords + ['Homeland Security']
keyWords = keyWords + ['Public Affairs']
keyWords = keyWords + ['Juris Doctor']
keyWords = keyWords + ['Socialwork']
keyWords = keyWords + ['Social Service']
keyWords = keyWords + ['Criminal']
keyWords = keyWords + ['Social Care']
keyWords = keyWords + ['Public Service']
keyWords = keyWords + ['Welfare']
keyWords = keyWords + ['Jurisprudence']
keyWords = keyWords + ['Human Rights']
keyWords = keyWords + ['Museum']
keyWords = keyWords + ['Jd']
# 2022 additions
keyWords = keyWords + ['Direito']
keyWords = keyWords + ['Arquitetura E Urbanismo']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Social Sciences
#-----------------------------

currMajor = "Social Sciences"
saveMajor = "Social_Sciences"

keyWords = []

keyWords = keyWords + ['Anthropology']
keyWords = keyWords + ['Econom']
keyWords = keyWords + ['Ethnic Studies']
keyWords = keyWords + ['Geography']
keyWords = keyWords + ['Political Science']
keyWords = keyWords + ['Government']
keyWords = keyWords + ['International Relations']
keyWords = keyWords + ['Psycholog']
keyWords = keyWords + ['Psycolog']
keyWords = keyWords + ['Social Work']
keyWords = keyWords + ['Sociology']
keyWords = keyWords + ['Gender Studies']
keyWords = keyWords + ['Social Science']
# New additions
keyWords = keyWords + ['Politic']
keyWords = keyWords + ['International']
keyWords = keyWords + ["Women\'s Studies"]
keyWords = keyWords + ["Behavioral Science"]
keyWords = keyWords + ["American"]
keyWords = keyWords + ["Global"]
keyWords = keyWords + ["Cognitive Science"]
keyWords = keyWords + ["Asian Studies"]
keyWords = keyWords + ["European Studies"]
keyWords = keyWords + ["Urban Studies"]
keyWords = keyWords + ["Decision Science"]
keyWords = keyWords + ["Foreign"]
keyWords = keyWords + ["Family And Consumer Sciences"]
keyWords = keyWords + ["Development Studies"]
# 2022 additions
keyWords = keyWords + ["Psicologia"]
keyWords = keyWords + ["Econôm"]
keyWords = keyWords + ["Relações Internacionais"]

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("Women\'S","Women\'s").replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID).replace("Womens","Women's")

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()
    
#-----------------------------
# Technology
#-----------------------------

currMajor = "Technology"
saveMajor = "Technology"

keyWords = []

keyWords = keyWords + ['Data']
keyWords = keyWords + ['Technology']
keyWords = keyWords + ['Computer']
keyWords = keyWords + ['Software']
keyWords = keyWords + ['System']
keyWords = keyWords + ['Network']
keyWords = keyWords + ['Cyber']
keyWords = keyWords + ['Web']
# New additions
keyWords = keyWords + ['Information']
keyWords = keyWords + ['Computing']
keyWords = keyWords + ['CompSc']
keyWords = keyWords + ['It Program']
keyWords = keyWords + ['It Security']
keyWords = keyWords + ['Informatics']
keyWords = keyWords + ['Machine Learning']
keyWords = keyWords + ['It']
keyWords = keyWords + ['Cis']
keyWords = keyWords + ['Cs']
keyWords = keyWords + ['Cse']
keyWords = keyWords + ['BTech']
keyWords = keyWords + ['MTech']
keyWords = keyWords + ['Bca']
keyWords = keyWords + ['Mca']
# 2022 additions
keyWords = keyWords + ['Tecnologia']
keyWords = keyWords + ['Informática']
keyWords = keyWords + ['Ciência Da Computação']
keyWords = keyWords + ['Sistemas De Informação']
keyWords = keyWords + ['Informatique']
keyWords = keyWords + ['Tecnologia Da Informação']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'').replace(']','.').replace('&','\&').replace('"','')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = listMajor.replace("[",majorID)

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

##############################################################################
# Create list of keywords within each degree
##############################################################################

#-----------------------------
# Bachelors
#-----------------------------

currMajor = "Bachelors"
saveMajor = "Bachelors"

keyWords = []

keyWords = keyWords + ['bachelor']
keyWords = keyWords + ['(ba)']
keyWords = keyWords + ['(bs)']
keyWords = keyWords + ['ba ']
keyWords = keyWords + ['baccalaureate']
keyWords = keyWords + ['bs ']
keyWords = keyWords + ['bsc in']
keyWords = keyWords + ['btec']
keyWords = keyWords + ['bfa']
keyWords = keyWords + ['be in']
keyWords = keyWords + ['bsc']
keyWords = keyWords + ['bcomm']
keyWords = keyWords + ['baas']
keyWords = keyWords + ['bsc']
keyWords = keyWords + ['bs ']
keyWords = keyWords + ['bsc ']
keyWords = keyWords + ['bcom ']
keyWords = keyWords + ['bsba']
keyWords = keyWords + ['babs']
keyWords = keyWords + ['ba']
keyWords = keyWords + ['bs']
keyWords = keyWords + ['be']
keyWords = keyWords + ['btech']
keyWords = keyWords + ['bba']
keyWords = keyWords + ['b tech']
keyWords = keyWords + ['bcom']
keyWords = keyWords + ['beng']
keyWords = keyWords + ['bca']
keyWords = keyWords + ['bcom']
keyWords = keyWords + ['bsn']
keyWords = keyWords + ['btec']
keyWords = keyWords + ['b sc']
keyWords = keyWords + ['b s']
keyWords = keyWords + ['b a']
keyWords = keyWords + ['bse']
keyWords = keyWords + ['b e']
keyWords = keyWords + ['b ed']
keyWords = keyWords + ['ab']
keyWords = keyWords + ['b com']
keyWords = keyWords + ['bsee']
keyWords = keyWords + ['bas']
keyWords = keyWords + ['bed']
keyWords = keyWords + ['bbm']
keyWords = keyWords + ['b eng']
keyWords = keyWords + ['bsme']
keyWords = keyWords + ['bbm']
keyWords = keyWords + ['basc']
keyWords = keyWords + ['bpharm']
keyWords = keyWords + ['bach']
keyWords = keyWords + ['bsa']
keyWords = keyWords + ['bscs']
keyWords = keyWords + ['bbs']
keyWords = keyWords + ['bsw']
keyWords = keyWords + ['barch']
keyWords = keyWords + ['baccalauréat']
keyWords = keyWords + ['llb']
keyWords = keyWords + ['mbbs']
keyWords = keyWords + ['bm']
keyWords = keyWords + ['bgs']
keyWords = keyWords + ['bms']
keyWords = keyWords + ['bscit']
# 2022 additions
keyWords = keyWords + ['graduação']
keyWords = keyWords + ['bacharelado']
keyWords = keyWords + ['bacharel']
keyWords = keyWords + ['graduação em']
keyWords = keyWords + ['b pharmbsed']
keyWords = keyWords + ['bsedballb']
keyWords = keyWords + ['ballb']
keyWords = keyWords + ['b arch']
keyWords = keyWords + ['bac']
keyWords = keyWords + ['b s in']
keyWords = keyWords + ['beng in']
keyWords = keyWords + ['bsn in']
keyWords = keyWords + ['bse in']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Associates
#-----------------------------

currMajor = "Associates"
saveMajor = "Associates"

keyWords = []

keyWords = keyWords + ['associate']
keyWords = keyWords + ['aa in']
keyWords = keyWords + ['assoc']
keyWords = keyWords + ['aa']
keyWords = keyWords + ['as']
keyWords = keyWords + ['a a']
keyWords = keyWords + ['a s']
keyWords = keyWords + ['aas']
keyWords = keyWords + ['ad']
keyWords = keyWords + ['adn']
# 2022 additions
keyWords = keyWords + ['as in']
keyWords = keyWords + ['aas in']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Masters
#-----------------------------

currMajor = "Masters"
saveMajor = "Masters"

keyWords = []

keyWords = keyWords + ['master']
keyWords = keyWords + ['ma ']
keyWords = keyWords + ['ms ']
keyWords = keyWords + ['msc in']
keyWords = keyWords + ['ma in']
keyWords = keyWords + ['ms in']
keyWords = keyWords + ['ma']
keyWords = keyWords + ['ms']
keyWords = keyWords + ['m a']
keyWords = keyWords + ['m s']
keyWords = keyWords + ['mpa']
keyWords = keyWords + ['msa']
keyWords = keyWords + ['me']
keyWords = keyWords + ['mfa']
keyWords = keyWords + ['mph']
keyWords = keyWords + ['msw']
keyWords = keyWords + ['meng']
keyWords = keyWords + ['mca']
keyWords = keyWords + ['msc']
keyWords = keyWords + ['mtech']
keyWords = keyWords + ['m tech']
keyWords = keyWords + ['msn']
keyWords = keyWords + ['m sc']
keyWords = keyWords + ['mcom']
keyWords = keyWords + ['mms']
keyWords = keyWords + ['mse']
keyWords = keyWords + ['msee']
keyWords = keyWords + ['mm']
keyWords = keyWords + ['msed']
keyWords = keyWords + ['m ed']
keyWords = keyWords + ['llm']
keyWords = keyWords + ['mphil']
keyWords = keyWords + ['mdiv']
keyWords = keyWords + ['mlis']
keyWords = keyWords + ['mls']
keyWords = keyWords + ['masc']
keyWords = keyWords + ['mps']
keyWords = keyWords + ['m com']
keyWords = keyWords + ['m eng']
# 2022 additions
keyWords = keyWords + ['mestrado']
keyWords = keyWords + ['m phil']
keyWords = keyWords + ['mtech']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# Postgraduate
#-----------------------------

currMajor = "Postgraduate"
saveMajor = "Postgraduate"

keyWords = []

keyWords = keyWords + ['post graduate']
keyWords = keyWords + ['postgraduate']
keyWords = keyWords + ['certificate of secondary education']
keyWords = keyWords + ['higher secondary certificate']
keyWords = keyWords + ['p g diploma']
keyWords = keyWords + ['professional diploma']
keyWords = keyWords + ['pgdm']
keyWords = keyWords + ['graduate diploma']
keyWords = keyWords + ['post graudation diploma']
keyWords = keyWords + ['graduate certificate']
keyWords = keyWords + ['pg[a-z ]*diploma']
keyWords = keyWords + ['post[a-z ]*diploma']
# 2022 additions
keyWords = keyWords + ['pósgraduação']
keyWords = keyWords + ['pós graduação']
keyWords = keyWords + ['posgrado']
keyWords = keyWords + ['postgrado']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# MBA
#-----------------------------

currMajor = "MBA"
saveMajor = "MBA"

keyWords = []

keyWords = keyWords + ['mba']
keyWords = keyWords + ['m b a']
keyWords = keyWords + ['master[a-z ]*business administration']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# PhD
#-----------------------------

currMajor = "PhD"
saveMajor = "PhD"

keyWords = []

keyWords = keyWords + ['phd']
keyWords = keyWords + ['ph d']
keyWords = keyWords + ['doctorate']
keyWords = keyWords + ['doctoral']
keyWords = keyWords + ['doctor[a-z ]*philosophy']
keyWords = keyWords + ['dphil']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()

#-----------------------------
# JD
#-----------------------------

currMajor = "JD"
saveMajor = "JD"

keyWords = []

keyWords = keyWords + ['jd']
keyWords = keyWords + ['juris doctor']
keyWords = keyWords + ['j d']
keyWords = keyWords + ['doctor[a-z ]*jurisprudence']

keyWords.sort()

keyWords = str(keyWords)

listMajor = keyWords.replace("'",'')

majorID    = "\\textbf{" + currMajor + "}: "

listMajor = majorID + listMajor[1:]

listMajor = listMajor[0:len(listMajor)-1] + "."

f = open(listPath + 'Keywords_' + saveMajor + '.txt', 'w')
f.write(listMajor)
f.close()